from multiprocessing import Process, Pipe


def func(conn):
    conn.send("Hello,This is Python!")  # 发送
    conn.close()


if __name__ == '__main__':
    parent_conn, child_conn = Pipe()
    p = Process(target=func, args=(child_conn,))
    p.start()
    print(parent_conn.recv())  # 接收
    p.join()